const mongoose = require("mongoose");
mongoose.connect("mongodb://127.0.0.1:27017/test")
const tagSchema = new mongoose.Schema({
    //text:String,
    text:{
        type:String,
        minlength:2,
        maxlength:12
    }
})

const tagModel = new mongoose.model("tag",tagSchema);
//tagModel.

module.exports = tagModel;
//module.exports = userModel; ?
// const arr=[{text:"HTML"},{text:"SQL"},{text:"NodeJS"}]
// tagModel.insertMany(arr,function(err,docs){
// console.log(err);
// console.log(docs);
// });